package com.nf;

import com.nf.entity.PropertiesZ;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import java.util.Set;

public class TestPrivceProperties {
    public static void main(String[] args){
        ApplicationContext ac = new ClassPathXmlApplicationContext("applicationContext.xml");

        PropertiesZ propertiesZ = (PropertiesZ) ac.getBean("privceC");
        Set<String> set = propertiesZ.getProperties().stringPropertyNames();
        for (String i: set) {
            System.out.println(i+"="+propertiesZ.getProperties().getProperty(i));
        }

    }
}
